home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / comms / mosiac / mosaic_1.2_amitcp / rexx / playmod.rexx < prev    next >
OS/2 REXX Batch file  |  1978-06-29  |  1KB  |  43 lines

  1. /* PLAYMOD.rexx */
  2. options RESULTS
  3. ARG filename
  4. if ~show(l, "rexxsupport.library") then
  5.     if ~addlib("rexxsupport.library", 0, -30) then
  6.     exit
  7. IF  SHOW('P','EDPLAYER')  THEN DO   /* Already there */
  8.     DELAY(5)
  9. END
  10. ELSE DO    
  11.     ADDRESS COMMAND 'run >nil: <nil: edplayer:edplayer -i '
  12.     count = 20;
  13.     DO UNTIL   (SHOW('P','EDPLAYER') | (count <=0))
  14.     DELAY(30)
  15.     END
  16.     IF (~   SHOW('P','EDPLAYER')) THEN DO
  17.     SAY "AMOSAIC (Playmod.rexx): I'm afraid I can't start edplayer."
  18.     SAY "Make sure that it is available as Edplayer:edlayer."
  19.     EXIT
  20.     END 
  21. END 
  22.  
  23. /* Hires player, if deiconified */
  24. ADDRESS 'EDPLAYER' 'SYNTH 2'
  25. /* Asl file requester, ordinary size text */
  26. ADDRESS 'EDPLAYER' 'FREQ 34'
  27. ADDRESS 'EDPLAYER' 'JUKE '||filename
  28. ADDRESS 'EDPLAYER' "PJUM"
  29. ADDRESS 'EDPLAYER' "MESS Amiga Mosaic Music Playback"
  30. Delay(30)
  31.  
  32.  /* if something still playing or paused,  leave alone */
  33. DO  UNTIL (~((edstatus = 5) | (edstatus = 9)||(edstatus = 6)|(edstatus = 10)))
  34.     ADDRESS 'EDPLAYER' "MESS Amiga Mosaic Music Playback. Mosaic is from the NCSA at the University of Illinois at Urbana Champagne. The Amiga port is by Michael Fischer, Michael Witbrock, and Michael Meyer. "
  35.     Delay(1800)  /* 30 seconds */
  36.     ADDRESS 'EDPLAYER' 'APLA'
  37.     edstatus=RESULT
  38. END
  39. /* if everything finished, or we are stopped then leave viewer and delete */
  40. ADDRESS 'EDPLAYER' 'KILL'
  41. ADDRESS COMMAND 'DELETE '||filename
  42.  
  43.